<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>展示</title>
</head>
<body>
  <form method="post" action="{% url 'seeks' %}">
      {% csrf_token %}
      <select name="tname">
          {% for x in leavec %}
              <option>{{ x.tname}}-{{ x.tname.count }}</option>
          {% endfor %}
      </select>
      <input type="submit" value="过滤">
  </form>
  <table border="1">
      <tr>
          <td>编号</td>
          <td>姓名</td>
          <td>事由</td>
          <td>状态</td>
          <td>类型</td>
          <td colspan="2">操作</td>
      </tr>
      {% for i in leave %}
      <tr>
          <td>{{ i.id }}</td>
          <td>{{ i.istu_named }}</td>
          <td>{{ i.status }}</td>
          <td>{{ i.context }}</td>
          <td>{{ i.tid }}</td>
          <td><a>通过</a></td>
          <td><a>不通过</a></td>
      </tr>{% endfor %}
  </table>
   {% if pre_page > 0%}
       <a href="{% url 'magor:clist' %}?page={{ pre_page }}">上一页</a>
   {% endif %}
   第{{ nowpage }}页
   共{{ allpage }}页
   {% if allpage >= next_page %}
       <a href="{% url 'magor:clist' %}?page={{ next_page }}">下一页</a>
   {% endif %}
</body>
</html>